/**
 * @fileoverview 
 * Get방식의 데이터 요청에 대해 데이터를 캐싱한다.
 */
luffy.common.DataCache = {	
	
	getData : function(sUrl,oParam){
		if(!this.CACHE){
			this.CACHE = {};
			return null;
		}
		
		var sKey = this._createKey(sUrl,oParam);
		
		return this.CACHE[sKey];
	},
	
	setData : function(sUrl,oParam,oData){
		if(!this.CACHE){
			this.CACHE = {};
		}
		
		var sKey = this._createKey(sUrl,oParam);
		this.CACHE[sKey] = oData;				
	},
	_createKey : function(sUrl, oParam){
		var sParam = this._toParamString(oParam);
		return sUrl+sParam;		
	},
	_toParamString : function(oParam){
		var sParam = [];
		for(var item in oParam){
			sParam.push(item);
			sParam.push("=");
			sParam.push(oParam[item]);
			sParam.push("&");
		}
		return sParam.join("");
	}
};